function lbFormats_CreateFcn(h, e)
%LBFORMATS_CREATEFCN Summary of this function goes here
%   Detailed explanation goes here

ui.ListBox.Style={'style', 'listbox', 'BackgroundColor', [1 1 1], 'units', 'normalized'};
handles= guihandles(h);

SelectedAdaptor= uicontrol_SelectedItem(handles.pmAdaptors);
SelectedDevice= uicontrol_SelectedIndex(handles.pmDevices);

set(h, ...
    'string', SupportedFormats(SelectedAdaptor, SelectedDevice), ...
    'tag', 'lbFormats');
set(h, ui.ListBox.Style{:});

Format= getappdata(handles.dlgVideoInput, 'Format');
if isempty(Format)
    imaqhw=imaqhwinfo(SelectedAdaptor, SelectedDevice);
    uicontrol_SelectedItem(h, imaqhw.DefaultFormat);
else
    uicontrol_SelectedItem(h, Format);
end

end

function list= SupportedFormats(Adaptor, Device)
    imaqhw=imaqhwinfo(Adaptor, Device);
    list= imaqhw.SupportedFormats;
end